package main

import (
	"fmt"
	"os"
)

func FileListExists(files []string) (bool, error) {
	for _, f := range files {
		if exist,err := FileExists(f); exist == false {
			return false, err
		}
	}

	return true, nil
}

func FileExists(file string) (bool, error) {
	_, err := os.Stat(file)
	if err == nil {
		return true, nil
	}
	if os.IsNotExist(err) {
		return false, err
	}
	return false, err
}


func main() {
	b, err := FileListExists([]string{"a.yaml"})
	if !b {
		fmt.Println(err)
	}

	return
}
